home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 1
/
CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso
/
Aminet
/
comm
/
mebbs
/
dizlist.lha
/
AFTERUP.REXX
next >
Wrap
OS/2 REXX Batch file
|
1994-06-16
|
4KB
|
173 lines
/* FILEID.DIZ searcher - original by Larry Cloud */
/* Modified by Keith Townsend */
/*
signal on ERROR
*/
parse arg LineNumber
options results
DoorName = "DIZLIST"
author = "Keith Townsend"
if( ~show( 'l', "mebbsarexx.library" ) )then do
if( ~addlib( "mebbsarexx.library", 0, -30, 0 ) )then do
say "Could not open library"
exit 10
end
end
/* Open the config File */
call open conf,('MEBBSNET:CONFIGFILES/DIZ.CFG'), 'R'
descpath = readln(conf)
tempath = readln(conf)
diztemp = readln(conf)
call close conf
filepath=tempath||"tmp"||linenumber
string= ""
call output
string="Please stand by, Checking archive for long description file"
call output
string="This will just take a few seconds..."
call output
call carrier
address command "list "filepath" > t:filelist.txt lformat %n"
c=0
call open(file,"t:filelist.txt","R")
do until eof(file)
c=c+1
filename.c=readln(file)
end
call close(file)
call carrier
do i=1 to c
if upper(right(filename.i,4))=".LHA" then do
unstring="lha e "
estring=""
call doit
end
if upper(right(filename.i,3))=".LZ" then do
unstring="lha e "
estring=""
call doit
end
if upper(right(filename.i,4))=".LZH" then do
unstring="lha e "
estring=""
call doit
end
if upper(right(filename.i,4))=".ZIP" then do
unstring="unzip -x "
estring=""
call doit
end
if upper(right(filename.i,4))=".ARC" then do
unstring="arc e "
estring=""
call doit
end
if upper(right(filename.i,4))=".ZOO" then do
unstring="booz x "
estring=""
call doit
end
if upper(right(filename.i,4))=".DMS" then do
unstring="DMS VIEWDIZ "
estring=" SAVE"
call doit
end
end
address command "delete t:filelist.txt"
address command "delete t:DIZLIST.BAT"
address command "delete "||diztemp||Linenumber||"#?.#?"
string="Thank You for using "||Doorname||" by "||Author
call output
string=""
call output
call Exit_Door DoorName,LineNumber
exit 0
ERROR:
address command "delete t:filelist.txt"
address command "delete t:DIZLIST.BAT"
address command "delete "||diztemp||Linenumber||"#?.#?"
call Exit_Door DoorName,LineNumber
exit 0
Carrier:
call CDetect doorname,linenumber
cd=upper(result)
if cd="NO CARRIER!" then signal error
return
doit:
call open Tfile,('T:DIZLIST.BAT'),'W'
call writeln Tfile, "cd "||diztemp
call writeln Tfile, "Copy "||filepath||"/"||filename.i||" to "||diztemp||""||Linenumber||filename.i
call writeln Tfile, "wait 1"
call writeln Tfile, unstring||Linenumber||filename.i||estring||" file_id.diz"
call writeln Tfile, "wait 1"
call writeln Tfile, "rename file_id.diz as "||LineNumber||"file_id.diz"
call writeln Tfile, 'endcli'
call close Tfile
address command "execute T:DIZLIST.BAT"
if exists(diztemp||LineNumber||"file_id.diz") then do
string=""
call output
string="I found a FILE_ID.DIZ file in "Filename.i""
call output
string="and copied it as a Long Description "
call output
string=""
call output
string="Please select N or hit <ENTER> at "
call output
string="the "Would you like to add a LONG description" prompt, to use the new"
call output
string="FILE_ID.DIZ description, or Y to add you own long description"
call output
string=""
call output
address command "copy "||diztemp||LineNumber||"FILE_ID.DIZ TO "descpath||filename.i||".DESC"
address command "wait 2"
address command "delete t:filelist.txt"
address command "delete t:DIZLIST.BAT"
address command "delete "||diztemp||Linenumber||"#?.#?"
return
end
else do
string="No FILE_ID.DIZ found in "Filename.i""
call output
string="You may enter a long description if you wish."
call output
address command "delete "||diztemp||Linenumber||"#?.#?"
end
return
output:
call message doorname,linenumber,string,1
return